package com.ccb.lms.dao;

import java.sql.SQLException;
import java.util.List;

import com.ccb.lms.model.Copy;
import com.ccb.lms.util.BasePage;

public interface ICopyDAO {
	/**
	 * 增加一条记录
	 * @param copy
	 * @return
	 * @throws SQLException
	 */
	public boolean insertCopy(Copy copy) throws SQLException;   
	
	/**
	 * 删除一条记录
	 * @param copyNO
	 * @return
	 * @throws SQLException
	 */
	public boolean deleteCopy(Integer copyNO) throws SQLException;
	
	/**
	 * 更新一条记录
	 * @param copy
	 * @return
	 * @throws SQLException
	 */
	public boolean updateCopy(Copy copy) throws SQLException;   
	
	/**
	 * 查询所有copy记录
	 * @return
	 * @throws SQLException
	 */
	public List<Copy> getAllCopys() throws SQLException; 
	
	/**
	 * 根据copyNO查询copy
	 * @param copyNO
	 * @return
	 * @throws SQLException
	 */
	public Copy getCopyByNO(Integer copyNO) throws SQLException;
	
	/**获取记录条目数
	 * 
	 * @return
	 * @throws SQLException
	 */
	public int getCopyCount() throws SQLException;
	
	/**
	 * 获得页面信息
	 * @param currentPage
	 * @param showRecordNum
	 * @return
	 * @throws SQLException
	 */
	public BasePage getBasePage(int currentPage,int showRecordNum) throws SQLException;
	
	/**
	 * 根据页面确定要显示的记录
	 * @param basePage
	 * @return
	 * @throws SQLException
	 */
	public List<Copy> getCopyByPage(BasePage basePage) throws SQLException;
	
}
